//
//  CustomNaviBarSearchController.h
//  CustomDemo
//
//  Created by 于洪东 on 16/6/24.
//  Copyright © 2016年 于洪东. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CustomViewController.h"

@class CustomNaviBarSearchController;


@protocol CustomNaviBarSearchControllerDelegate <NSObject>
/**
 *  搜索按钮点击
 */
- (void)naviBarSearchCtrl:(CustomNaviBarSearchController *)ctrl searchKeyword:(NSString *)strKeyword;
/**
 *  取消按钮点击
 */
- (void)naviBarSearchCtrlCancel:(CustomNaviBarSearchController *)ctrl;

@optional
/**
 *  清空搜索记录
 */
- (void)naviBarSearchCtrlClearKeywordRecord:(CustomNaviBarSearchController *)ctrl;

@end


@interface CustomNaviBarSearchController : NSObject

@property (nonatomic,assign) id<CustomNaviBarSearchControllerDelegate>delegate;

/**
 *  初始化
 */
- (id)initWithParentViewCtrl:(CustomViewController *)viewCtrl;
/**
 *  自动布局问题    -----   viewNaviBar 的尺寸一直是 0   所以此方法必须在 viewDidAppear中调用
 */
/**
 *  设置搜索显示内容
 */
- (void)resetPlaceHolder:(NSString *)strMsg;


/**
 *  设置搜索关键字
 */
- (void)setRecentKeyword:(NSArray *)arrRecentKeyword;
- (void)setKeyword:(NSString *)strKeyword;


// 导航条上的关键字输入框分两种
// 1、由按钮触发，点击按钮后显示输入框，结束后销毁输入框现实按钮。
- (void)showTempSearchCtrl;
// 2、导航条一直显示输入框。
- (void)showFixationSearchCtrl;


- (void)removeSearchCtrl;


@end









